Skip to content

Conversation

vadorovsky
Copy link

Currently, GroupingMap can create a HashMap with the default RandomState.

For some kind of keys, using different BuildHasher implementation can result in better performance. Add a possibility to create a GroupingMap with a custom hasher builder, which then produces a HashMap with it.

Currently, `GroupingMap` can create a `HashMap` with the default
`RandomState`.

For some kind of keys, using different `BuildHasher` implementation can
result in better performance. Add a possibility to create a
`GroupingMap` with a custom hasher builder, which then produces a
`HashMap` with it.
@phimuemue
Copy link
Member

See also #901 and #906

@phimuemue phimuemue added the generic-container Generic vector/hasher/map label Sep 26, 2025
@phimuemue
Copy link
Member

Thanks for this.

Closing this for now, because - if we do this - we won't restrict ourselves to custom BuildHashers, but have entirely different containers.

@phimuemue phimuemue closed this Sep 26, 2025
@jswrenn
Copy link
Member

jswrenn commented Sep 26, 2025

We've been blocked for ages on the problem of abstracting over container type. Abstracting over hasher is a much simpler problem and, with type defaults, perhaps even a non-breaking change. I think we should consider this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generic-container Generic vector/hasher/map
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants